<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function $$(id){
				return document.getElementById(id)
			}
			window.onload=function(){
					var cnv=$$("canvas")
					var cxt=cnv.getContext("2d")
							
					var image=new Image()
					image.src="img/2.jpeg"
					image.onload=function(){
						
						cxt.shadowOffsetX=0
						cxt.shadowOffsetY=0
						cxt.shadowColor="lawngreen"
						cxt.shadowBlur=10

						cxt.beginPath()
						cxt.arc(70,70,50,0,360*Math.PI/180,true)
						cxt.closePath()
						var pattern=cxt.createPattern(image,"no-repeat")
						cxt.fillStyle=pattern
						cxt.fill()
					}
				}
		</script>
	</head>
	<body>
	<canvas id="canvas"width="200"height="150"style="border: gray dashed 1px;"></canvas>
	</body>
</html>
